package com.eastdigit.system.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by Administrator on 2016/8/17.
 */
public interface ICaptchaService {

    /**
     * 生成验证码图片
     * 
     * @param request
     * @param response
     */
    void buildImage(HttpServletRequest request, HttpServletResponse response) throws IOException;

    /**
     * 验证码验证
     * 
     * @param captcha
     *            验证码(忽略大小写)
     * @return 验证码验证是否通过
     */
    boolean isValid(String captcha);

}
